﻿//#include <QGuiApplication>
//#include <QQmlApplicationEngine>




//int main(int argc, char *argv[])
//{
//    QGuiApplication app(argc, argv);

//    QQmlApplicationEngine engine;
//    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));




//    return app.exec();
//}

#include <QQuickView>
#include <QGuiApplication>
//修改4.1中的内容，将Window替换为Rectangle

int main(int argc, char *argv[]){

    QGuiApplication app(argc, argv);

    QQuickView view;
    view.setResizeMode(QQuickView::SizeRootObjectToView);
//    view.setSource(QUrl("qrc:///main.qml"));
//    view.setSource(QUrl("qrc:///4_3_5_anchors_0.qml"));
    view.setSource(QUrl("qrc:///4_3_6_key_action.qml"));

    view.show();

    return app.exec();
}

